//
//  TPVerticalPageViewCell.h
//  ThePaperBase
//
//  Created by liubo on 2021/8/20.
//  Copyright © 2021 scar1900. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LBVerticalPageviewHeader.h"

NS_ASSUME_NONNULL_BEGIN

@protocol LBVerticalPageViewCellDelegate <NSObject>

@optional
///scrollview滚动
- (void)verticalPageScrollViewDidScroll:(UIScrollView *)scrollView;

///scrollview 停止拖动
- (void)verticalPageScrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate;

@end

@interface LBVerticalPageViewCell : UIView

///tableView

@property (nonatomic, strong) UITableView *tableView;

- (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier NS_DESIGNATED_INITIALIZER;

- (instancetype)initWithCoder:(NSCoder *)coder NS_UNAVAILABLE;

- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;

///识别标识符
@property (nonatomic, copy, readonly) NSString *reuseIdentifier;

///代理
@property (nonatomic, weak) id <LBVerticalPageViewCellDelegate> delegate;

/// 翻到下一页偏移量临界值 , 默认80
@property (nonatomic, assign) CGFloat toNextThrottle;
/// 翻到上一页偏移量临界值， 默认80
@property (nonatomic, assign) CGFloat toLastThrottle;

/// 设置单个视图的偏移量
- (void)configContentOffset:(CGFloat)offset;

///更新数据源
- (void)updateWithModel:(id)model;

///返回到上一页
@property (nonatomic, copy) void (^next)(void);
/// 进入到下一页
@property (nonatomic, copy) void (^toLast)(void);

//翻到上一页提示视图
@property (nonatomic, strong) UIView <LBVerticalPageIndicatorViewProtocal> *refreshIndicatorView;
///翻到下一页提示视图
@property (nonatomic, strong) UIView <LBVerticalPageIndicatorViewProtocal> *loadMoreIndicatorView;

@end

NS_ASSUME_NONNULL_END
